<script src="<?php echo RESOURCE_URL?>/js/jquery.js"></script>
<form action="index.php?act=goods&op=goods_edit" method="post" enctype="multipart/form-data">
<input type="hidden" name="goods_id" value="<?php echo $_GET['goods_id']?>">
    <table>
    <tr><td>所属分类：</td><td>
            <span id="cate_name_ori"><?php echo $goods_array['cate_name']?></span><?php $cate_model=new cateModel();$cate_model->cateSel();?><a href="javascript:void(0)" id="edit_not" onclick="edit_func()">修改分类：</a>

        </td></tr>
    <tr><td>商品名称：</td><td><input type="text" name="goods_name" value="<?php echo $goods_array['good_name']?>"></td></tr>
    <tr><td>商品价格：</td><td><input type="text" name="goods_price" value="<?php echo $goods_array['good_price']?>" /></td></tr>
    <tr><td>商品原图：</td><td><img alt="没有上传" src="<?php echo SITE_URL.DS.$goods_array['good_thumb']?>"></td></tr>
    <tr><td>商品单图：</td><td><input type="file" name="goods_img"><br>不上传，表示使用原图</td></tr>
    <tr><td>商品描述：</td><td><textarea cols="20" rows="8" name="goods_desc"><?php echo $goods_array['good_name']?></textarea></td></tr>
    <tr><td><input type="submit" name="submit_goods_edit" value="编辑"></td></tr>
</table>

</form>
<script>
    $('#level0').hide();
    function edit_func(){
        if($('#edit_not').html()=='不修改'){
            $('#cate_name_ori').show();
            $('#level0').hide();
            $('#edit_not').html('修改分类');
            return;
        }
        $('#cate_name_ori').hide();
        $('#level0').show();
        $('#edit_not').html('不修改');

    }
</script>